﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExcelSystem.ToolHelper
{
    public static class ConvetHelper
    {
        public static decimal? ToDecimal(string par)
        {
            if (String.IsNullOrEmpty(par)) return null;
            else
                return Convert.ToDecimal(par);
        }

        public static decimal? ToDouble(object par)
        {
            if (par == null) return null;   
            else   if (String.IsNullOrEmpty(par.ToString())) return null;
            else
                return Convert.ToDecimal(par);
        }
    }
}
